/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.diamondsys.embrapa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Pablo
 */
@Embeddable
public class ParticipanteEventoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "tb_inst_cod_instituicao")
    private int tbInstCodInstituicao;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sigif_eventosint_ideventosint")
    private int sigifEventosintIdeventosint;

    public ParticipanteEventoPK() {
    }

    public ParticipanteEventoPK(int tbInstCodInstituicao, int sigifEventosintIdeventosint) {
        this.tbInstCodInstituicao = tbInstCodInstituicao;
        this.sigifEventosintIdeventosint = sigifEventosintIdeventosint;
    }

    public int getTbInstCodInstituicao() {
        return tbInstCodInstituicao;
    }

    public void setTbInstCodInstituicao(int tbInstCodInstituicao) {
        this.tbInstCodInstituicao = tbInstCodInstituicao;
    }

    public int getSigifEventosintIdeventosint() {
        return sigifEventosintIdeventosint;
    }

    public void setSigifEventosintIdeventosint(int sigifEventosintIdeventosint) {
        this.sigifEventosintIdeventosint = sigifEventosintIdeventosint;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += tbInstCodInstituicao;
        hash += sigifEventosintIdeventosint;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ParticipanteEventoPK)) {
            return false;
        }
        ParticipanteEventoPK other = (ParticipanteEventoPK) object;
        if (this.tbInstCodInstituicao != other.tbInstCodInstituicao) {
            return false;
        }
        if (this.sigifEventosintIdeventosint != other.sigifEventosintIdeventosint) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.diamondsys.embrapa.ParticipanteEventoPK[ tbInstCodInstituicao=" + tbInstCodInstituicao + ", sigifEventosintIdeventosint=" + sigifEventosintIdeventosint + " ]";
    }
    
}
